package com.tencet.servlet;

import com.tencet.service.Impl.TransferServiceImpl;
import com.tencet.service.Impl.WithdrawalImpl;
import com.tencet.service.TransferService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author: @date: 2022/7/21 22:03
 * @description:
 */
@WebServlet("/transfer3")
public class TransferServlet3 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        int money = Integer.parseInt(req.getParameter("money"));
        String reduce_num = req.getParameter("reduce_num");

        TransferService transferService = new TransferServiceImpl();
        boolean b = transferService.trueOrFalse(money, reduce_num);
        resp.getWriter().write(""+b);
//        req.getSession().getAttribute("list1");

    }
}